import Vue from 'vue'
//地图插件
import VueAMap from 'vue-amap';
import App from './App'
import store from './store'
import router from './router'
import './plugins'
import '@/layouts/export'
//图表插件
import VCharts from 'v-charts'
//使用图表插件
Vue.use(VCharts)

import Echarts from 'echarts'
Vue.prototype.$echarts = Echarts



//字体图标
import '@/styles/iconfont.css'
import 'default-passive-events'
//地图插件设置
 Vue.use(VueAMap);
 //初始化地图插件
 VueAMap.initAMapApiLoader({
   //地图秘钥
   key: '38426109449e8223772cff2e7a6d45d0',
   //使用到的地图插件
   plugin: ['AMap.Autocomplete', 'AMap.Geocoder','AMap.PlaceSearch','AMap.PoiPicker', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor','AMap.Geolocation'],
   // 版本号
   v: '1.4.4'
 });

// lodash库 引入
import _ from 'lodash'
Vue.prototype._ = _


//兄弟组件传值
import VueBus from 'vue-bus';
Vue.use(VueBus);

//列表提示组件
import promptmessage from '@/components/promptmessage/promptmessage'
// 全局注册组件
Vue.component('promptmessage',promptmessage)

if(sessionStorage.getItem('permission')) {
  let routerData = routeConfig();
  routerData.routes.forEach(route => router.options.routes.push(route));
  router.addRoutes(routerData.routes);
}
Vue.config.productionTip = false




new Vue({
  el: '#vue-wjjk',
  router,
  store,
  render: (h) => h(App),
})
